package com.job.model.admin;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name="job_privilege")
@IdClass(PrivilegePrimaryKey.class)
public class Privilege implements Serializable {
	private static final long serialVersionUID = 1L;
	private Resource resource;
	private Group group;
	private int permission;
	@Id
	@ManyToOne
	@JoinColumn(name="resourceId")
	public Resource getResource() {
		return resource;
	}
	public void setResource(Resource resource) {
		this.resource = resource;
	}
	@Id
	@ManyToOne
	@JoinColumn(name="groupId")
	public Group getGroup() {
		return group;
	}
	public void setGroup(Group group) {
		this.group = group;
	}
	public int getPermission() {
		return permission;
	}
	public void setPermission(int permission) {
		this.permission = permission;
	}
}
